<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page import="com.tisson.pojo.Page"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
	
		<base href="<%=basePath%>">
		<script type="text/javascript">
function checkAll(name) {
	var el = document.getElementsByTagName('input');
	var len = el.length;
	for(var i=0; i<len; i++){
		if((el[i].type=="checkbox") && (el[i].name==name)){
			el[i].checked = true;
		}
	}
}
function clearAll(name){
	var el = document.getElementsByTagName('input');
	var len = el.length;
	for(var i=0; i<len; i++){
		if((el[i].type=="checkbox") && (el[i].name==name)){
			el[i].checked = false;
		}
	}
} 
function trim(str){
	return str.replace(/(^\s*)|(\s*$)/g,"");
}
function form_submit(){
	document.getElementById("form").submit();
}
function goto(){
	var arg = document.getElementById("page_goto").value;
	if(!checkIsInteger(arg)){
		arg = 1;
	}
	var url = "Page_changePage.action?requestPage="+arg+"&map=JspDpmMdsupDoorlist";
	window.navigate(url);
}
function checkIsInteger(str)   {    
    if(/^(\-?)(\d+)$/.test(str))   
        return true;   
    else  
        return false;   
}

function selectAll(element) {
	var obj = document.getElementById(element);
	for (var i = 0; i < obj.length; i++) {
		if (obj.options[i].value != "") {
			obj.options[i].selected = true;
		}
	}
}

function form_submit(){
	document.getElementById("update").submit();
}
</script>
		<title></title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<style type="text/css">
img {
	border: 0;
}

body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
}

a {
	font-size: 12px;
	color: #3b6375;
}

.STYLE1 {
	color: #e1e2e3;
	font-size: 12px;
}

.STYLE6 {
	color: #000000;
	font-size: 12;
}

.STYLE10 {
	color: #000000;
	font-size: 12px;
}

.STYLE19 {
	color: #344b50;
	font-size: 12px;
}

.STYLE21 {
	font-size: 12px;
	color: #3b6375;
}

.STYLE22 {
	font-size: 12px;
	color: #295568;
}

.submitStyle {
	background: url(images/del.gif);
	border: 0px
}
.btn {
BORDER-RIGHT: #7b9ebd 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #7b9ebd 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#cecfde); BORDER-LEFT: #7b9ebd 1px solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM: #7b9ebd 1px solid
}
.btn1_mouseout {
BORDER-RIGHT: #7EBF4F 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #7EBF4F 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#B3D997); BORDER-LEFT: #7EBF4F 1px solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM: #7EBF4F 1px solid
}
.btn1_mouseover {
BORDER-RIGHT: #7EBF4F 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #7EBF4F 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#CAE4B6); BORDER-LEFT: #7EBF4F 1px solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM: #7EBF4F 1px solid
}
.btn2 {padding: 2 4 0 4;font-size:12px;height:23;background-color:#ece9d8;border-width:1;}
.btn3_mouseout {
BORDER-RIGHT: #2C59AA 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #2C59AA 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#C3DAF5); BORDER-LEFT: #2C59AA 1px solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM: #2C59AA 1px solid
}
.btn3_mouseover {
BORDER-RIGHT: #2C59AA 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #2C59AA 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#D7E7FA); BORDER-LEFT: #2C59AA 1px solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM: #2C59AA 1px solid
}
.btn3_mousedown
{
BORDER-RIGHT: #FFE400 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #FFE400 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#C3DAF5); BORDER-LEFT: #FFE400 1px solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM: #FFE400 1px solid
}
.btn3_mouseup {
BORDER-RIGHT: #2C59AA 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #2C59AA 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#C3DAF5); BORDER-LEFT: #2C59AA 1px solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM: #2C59AA 1px solid
}
.btn_2k3 {
BORDER-RIGHT: #002D96 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #002D96 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#FFFFFF, EndColorStr=#9DBCEA); BORDER-LEFT: #002D96 1px solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM: #002D96 1px solid
}
</style>
	</head>
	<body>
		<font color="red"><%=(String) request.getSession().getAttribute(
									"message") == null ? "" : (String) request
							.getSession().getAttribute("message")%></font>

		<form name="searchForm" action="mulAuthor_doorList" method="post">
			<input type="hidden" name="userId"
				value="<s:property value="userId"/>" />
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td height="30">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td height="24" bgcolor="#353c44">
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td>
												<table width="100%" border="0" cellspacing="0"
													cellpadding="0">
													<tr>
														<td width="6%" height="19" valign="bottom">
															<div align="center">
																<img src="images/tb.gif" width="14" height="14" />
															</div>
														</td>
														<td width="94%" valign="bottom">
															<span class="STYLE1">搜索</span>
														</td>
													</tr>
												</table>
											</td>
											<td>
												<div align="right">
													<span class="STYLE1"> <input type="image"
															src="images/search.jpg" onClick="searchForm.submit()" />
													</span>
													<span class="STYLE1"> &nbsp; </span>
												</div>
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td>
						<table width="100%" border="0" cellpadding="0" cellspacing="1"
							bgcolor="#a8c7ce">
							<tr>
								<td width="17%" height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10">区域</span>
									</div>
								</td>
								<td width="17%" height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10">片区</span>
									</div>
								</td>
								<td width="16%" height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10">机楼</span>
									</div>
								</td>
								<td width="50%" height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10">部门</span>
									</div>
								</td>
							</tr>
							<tr>
								<td height="20" bgcolor="#FFFFFF" class="STYLE19">
									<div align="center">
										<table>
											<s:select name="areaId" onchange="searchForm.submit()"
												list="areaList" listKey="areaId" listValue="areaName"
												emptyOption="true" />
										</table>
									</div>
								</td>
								<td height="20" bgcolor="#FFFFFF" class="STYLE19">
									<div align="center">
										<table>
											<s:select name="districtId" onchange="searchForm.submit()"
												list="districtList" listKey="districtId"
												listValue="districtName" emptyOption="true" />
										</table>
									</div>
								</td>
								<td height="20" bgcolor="#FFFFFF" class="STYLE19">
									<div align="center">
										<table>
											<s:select name="buildingId" onchange="searchForm.submit()"
												list="buildingList" listKey="buildingId"
												listValue="buildingName" emptyOption="true" />
										</table>
									</div>
								</td>

								<td height="20" bgcolor="#FFFFFF" class="STYLE19">
									<div align="center">
										<table>
											<s:select name="departmentId" onchange="searchForm.submit()"
												list="departList" listKey="departmentId" listValue="depName"
												emptyOption="true" />
										</table>
									</div>
								</td>


							</tr>
						</table>
					</td>

				</tr>
			</table>

		</form>


		<form action="mulAuthor_saveMul.action" id="update" method="post">
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td height="20" bgcolor="#FFFFFF">
						<table class="selectstyle">
							<s:optiontransferselect doubleList="doorName" list="doorList"
								doubleName="dorId" listKey="doorId" listValue="doorName"
								doubleListKey="id" doubleListValue="doorName"
								leftTitle="所有门禁" rightTitle="所选门禁" multiple="true"
								doubleMultiple="true" allowAddAllToRight="true" doubleSize="15"
								size="15" id="option1"
								selectAllOnclick="selectNoneOptions(document.getElementById('option1'));"
								doubleId="dorId"
								buttonCssClass="btn3_mouseout"
								></s:optiontransferselect>
						</table>
					</td>
					<td height="20" bgcolor="#FFFFFF">
						<table class="selectstyle">
							<s:optiontransferselect doubleList="username" list="stuffList"
								doubleName="stuffId" listKey="userId" listValue="username"
								doubleListKey="id" doubleListValue="username"
								leftTitle="所有人员" rightTitle="所选人员" multiple="true"
								doubleMultiple="true" allowAddAllToRight="true" doubleSize="15"
								size="15" id="option3"
								selectAllOnclick="selectNoneOptions(document.getElementById('option3'));"
								doubleId="stuffId"
								buttonCssClass="btn3_mouseout"
								></s:optiontransferselect>
						</table>
					</td>
				</tr>

			</table>

			<div align="center">
				<input class="btn3_mouseout"
					onmouseover="this.className='btn3_mouseover'"
					onmouseout="this.className='btn3_mouseout'"
					onmousedown="this.className='btn3_mousedown'"
					onmouseup="this.className='btn3_mouseup'" title="点击保存" type="button" value="保存"
					onclick="selectAll('dorId');selectAll('stuffId');form_submit();">
				
				</input>
			</div>


		</form>

	</body>
</html>
